package com.battery.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.battery.common.annotation.Excel;
import tk.mybatis.mapper.annotation.KeySql;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * APP公告对象 ws_notice
 *
 * @author battery
 * @date 2021-08-17
 */
@Table(name = "ws_notice")
public class Notice {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String id;

    /**
     * 公告标题
     */
    @Excel(name = "公告标题")
    private String title;

    /**
     * 公告内容
     */
    private String content;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date releaseTime;

    /**
     * 发布者
     */
    @Excel(name = "发布者")
    private String publisher;

    /**
     * 是否删除
     */
    private Integer isDelete;

    /**
     * 展示开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "展示开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 展示关闭时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "展示关闭时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setReleaseTime(Date releaseTime) {
        this.releaseTime = releaseTime;
    }

    public Date getReleaseTime() {
        return releaseTime;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("title", getTitle())
                .append("content", getContent())
                .append("releaseTime", getReleaseTime())
                .append("publisher", getPublisher())
                .append("isDelete", getIsDelete())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .toString();
    }
}
